package thread;

//Runable 就是在描述一个 “任务”
class MyRunnable implements Runnable{
    @Override
    public void run() {
        System.out.println("hello");//写任务具体执行的内容
    }
}
public class Demo3 {
    public static void main(String[] args) {
        Thread t=new Thread(new MyRunnable());//直接new Thread
        t.start();
    }
}
